/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class DoubleOpeningCurtain {
    static categoryCode = '010010017';

    static categoryName = '双开窗帘';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return DoubleOpeningCurtain.categoryCode;
    }

    get categoryName() {
        return DoubleOpeningCurtain.categoryName;
    }

    getAutoStartSwitch(params) {
        return command({
            method: 'getAutoStartSwitch',
            methodId: 'phEqZoPl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLeftPosition(params) {
        return command({
            method: 'getLeftPosition',
            methodId: 'pDrhxkGM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRightPosition(params) {
        return command({
            method: 'getRightPosition',
            methodId: 'pghzV1dK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'p1vFkqsn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAutoStartSwitch(params) {
        return command({
            method: 'setAutoStartSwitch',
            methodId: 'pZgRgxaE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLeftPosition(params) {
        return command({
            method: 'setLeftPosition',
            methodId: 'ppAXpyTz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setRightPosition(params) {
        return command({
            method: 'setRightPosition',
            methodId: 'pUPQQijI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peHyXjDW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setToDefault(params) {
        return command({
            method: 'setToDefault',
            methodId: 'pGoxub69',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default DoubleOpeningCurtain;
